/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.aptech.entities;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.validation.constraints.NotNull;

/**
 *
 * @author Winner
 */
@Embeddable
public class TblOrderDetailPK implements Serializable {

    @Basic(optional = false)
    @NotNull
    @Column(name = "odID")
    private int odID;
    @Basic(optional = false)
    @NotNull
    @Column(name = "elID")
    private int elID;

    public TblOrderDetailPK() {
    }

    public TblOrderDetailPK(int odID, int elID) {
        this.odID = odID;
        this.elID = elID;
    }

    public int getOdID() {
        return odID;
    }

    public void setOdID(int odID) {
        this.odID = odID;
    }

    public int getElID() {
        return elID;
    }

    public void setElID(int elID) {
        this.elID = elID;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) odID;
        hash += (int) elID;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof TblOrderDetailPK)) {
            return false;
        }
        TblOrderDetailPK other = (TblOrderDetailPK) object;
        if (this.odID != other.odID) {
            return false;
        }
        if (this.elID != other.elID) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.aptech.entities.TblOrderDetailPK[ odID=" + odID + ", elID=" + elID + " ]";
    }
}
